from socket import *

s = socket(AF_INET,SOCK_DGRAM)
addr = ('',5000)
s.bind(addr)

while True:
    data,cliAddr = s.recvfrom(2048)
    print("recv  %s ,%s:%s"%((len(data),)+cliAddr))

s.close()